package com.imooc.news_manager_project.service;

import com.imooc.news_manager_project.common.Result;
import com.imooc.news_manager_project.domain.News;
import com.imooc.news_manager_project.dto.NewsDTO;
import com.imooc.news_manager_project.query.NewsQuery;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

public interface INewsService {
    List<News> getAllNews();


    Result save(HttpServletRequest request, NewsDTO newsDTO);

    Result getById(String id);

    Result listByParams(String title);
    Result listByParams(NewsQuery newsQuery);

    Result update(HttpServletRequest request, NewsDTO newsDTO);

    Result remove(HttpServletRequest request, String id);

    Result likesById(HttpServletRequest request, String id);
}
